#ifndef _ADD_GROUP_H
#define _ADD_GROUP_H

#include <gtk/gtk.h>
#include "clist.h"
#include "file.h"
struct addgroup_struct {
	struct file_ctrl *global_file;
	GtkWidget *window;
	struct clist_struct *clist;
	
	GtkWidget *label_cancel;
	GtkWidget *label_ok;
	GtkWidget *label_help;
	GtkWidget *label_name;
	
	GtkWidget *entry_name;
	
	GtkWidget *button_help;
	GtkWidget *button_cancel;
	GtkWidget *button_ok;
};
extern struct addgroup_struct addgroup;

GtkWidget*create_window_add_group (
		struct addgroup_struct *addgroup,struct clist_struct *clist);

void on_button_add_group_cancel_clicked(
		GtkButton *button,gpointer   user_data);

void on_button_add_group_ok_clicked(
		GtkButton *button,gpointer   user_data);

void on_window_add_group_destroy(
		GtkObject *object,gpointer   user_data);

void on_button_add_group_help_clicked(
		GtkButton *button,gpointer   user_data);
static void init_addgroup_struct(struct addgroup_struct *addgroup)
{
	addgroup->global_file=&global_file;
	addgroup->window=NULL;
	addgroup->clist=&clist;
	
	addgroup->label_cancel=NULL;
	addgroup->label_ok=NULL;
	addgroup->label_help=NULL;
	addgroup->label_name=NULL;
	addgroup->entry_name=NULL;
}

static void handle_for_create_window_add(gpointer user_data)
{
	addgroup.window=(GtkWidget *)create_window_add_group(&addgroup,&clist);
	gtk_widget_show(addgroup.window);
}

#endif //_ADD_GROUP_H
